package com.easwift.qsp.enums;

/**
 * 监测项枚举
 * 
 * @author Administrator
 *
 */
public enum MonitorItemEnum {

	FREQUENCY(1, "频率"),

	OM(2, "电阻"),

	CHANGE(3, "应变"),

	TEMPERATURE(4, "温度"),

	DISTANCE(5, "位移"),

	VOLTAGE(6, "电压"),

	ACCELERATE(7, "加速度计"),

	LEAN_ANGLE(8, "倾角仪"),

	WIND_PRESSURE(9, "风压传感器"),

	EARTHQUAKE(10, "地震仪"),

	SUPER_WIND_SPEED(11, "超声风速"),

	SUPER_WIND_DIRECTION(12, "超声风向"),

	WIND_ANGLE(13, "风仰角"),

	TEMPERATURE_JI(14, "温度"),

	MACHINE_WIND_SPEED(15, "机械风速"),

	MACHINE_WIND_DIRECTION(16, "机械风向"),

	DISTANCE_JI(17, "位移计");

	private int code;

	private String name;

	private MonitorItemEnum(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static String getNameByCode(int code) {
		for (MonitorItemEnum type : MonitorItemEnum.values()) {
			if (type.getCode() == code) {
				return type.getName();
			}
		}
		return null;
	}

}